package com.myway.dto.lottery;

import com.myway.dto.lottery.domain.LotteryPayFor;
import com.myway.dto.lottery.domain.LotteryPayStatus;
import org.springframework.util.StringUtils;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

public class DTOLotteryReportPayment implements Serializable {
	private static final long serialVersionUID = 8686366102778638433L;
	private Long id;
	private String payType;
	private BigDecimal amount = new BigDecimal(0.00);
	private String paymentNo;
	private LotteryPayStatus payStatus;
	private String merchantId;
	private Date payTime;
	private String currency;
	private LotteryPayFor payFor;
	private Long lotteryUserId;
	private Long lotteryListId;
	private String loginId;
	private String name;
	private String certificateno;
	private String cardNo;
	private String cellphone;
	private String productName;
	private String segments;
	private String depDate;

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public String getPayType() {
		return payType;
	}

	public void setPayType(String payType) {
		this.payType = payType;
	}

	public BigDecimal getAmount() {
		return amount;
	}

	public void setAmount(BigDecimal amount) {
		this.amount = amount;
	}

	public String getPaymentNo() {
		return paymentNo;
	}

	public void setPaymentNo(String paymentNo) {
		this.paymentNo = paymentNo;
	}

	public LotteryPayStatus getPayStatus() {
		return payStatus;
	}

	public void setPayStatus(LotteryPayStatus payStatus) {
		this.payStatus = payStatus;
	}

	public String getMerchantId() {
		return merchantId;
	}

	public void setMerchantId(String merchantId) {
		this.merchantId = merchantId;
	}

	public Date getPayTime() {
		return payTime;
	}

	public void setPayTime(Date payTime) {
		this.payTime = payTime;
	}

	public String getCurrency() {
		return currency;
	}

	public void setCurrency(String currency) {
		this.currency = currency;
	}

	public LotteryPayFor getPayFor() {
		return payFor;
	}

	public void setPayFor(LotteryPayFor payFor) {
		this.payFor = payFor;
	}

	public Long getLotteryUserId() {
		return lotteryUserId;
	}

	public void setLotteryUserId(Long lotteryUserId) {
		this.lotteryUserId = lotteryUserId;
	}

	public Long getLotteryListId() {
		return lotteryListId;
	}

	public void setLotteryListId(Long lotteryListId) {
		this.lotteryListId = lotteryListId;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getLoginId() {
		return loginId;
	}

	public void setLoginId(String loginId) {
		this.loginId = loginId;
	}

	public String getCertificateno() {
		return certificateno;
	}

	public void setCertificateno(String certificateno) {
		this.certificateno = certificateno;
	}

	public String getCardNo() {
		return cardNo;
	}

	public void setCardNo(String cardNo) {
		this.cardNo = cardNo;
	}

	public String getCellphone() {
		return cellphone;
	}

	public void setCellphone(String cellphone) {
		this.cellphone = cellphone;
	}

	public String getProductName() {
		return productName;
	}

	public void setProductName(String productName) {
		this.productName = productName;
	}

	public String getSegments() {
		return segments;
	}

	public void setSegments(String segments) {
		this.segments = segments;
	}

	public String getDepDate() {
		return depDate;
	}

	public void setDepDate(String depDate) {
		this.depDate = depDate;
	}

	public String getOrgCode() {
		if (StringUtils.hasText(segments)) {
			String[] s = segments.split("/");
			if (s.length == 2) {
				return s[0];
			}
		}
		return "";
	}

	public String getDstCode() {
		if (StringUtils.hasText(segments)) {
			String[] s = segments.split("/");
			if (s.length == 2) {
				return s[1];
			}
		}
		return "";
	}
}
